<?php
class Single extends CI_Controller {
	
	function __construct(){
		parent::__construct();
		$this->load->model(array(
						'Single_m'=>'single'));
		$this->load->library('result');
	}
	
	function getbytask(){
		$id=$this->uri->segment(3,-1);
		$data=$this->single->query(array('taskid'=>$id));
		if(!empty($data)){
			$this->result->setData(0,'获取数据完成',$data);
		}else{
			$this->result->setData(1,'获取数据失败',null);
		}
		$this->result->output();
	}

}